{% load static %}
<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <title>{% block title %}{% endblock %}</title>
     {% block css %}{% endblock %}
     {% block js %}{% endblock %}
     <script type="text/javascript" src="{% static '/plugins/jquery1.12.4.min.js' %}"></script>
     <link  rel="stylesheet" href="{% static '/css/base.css' %}">

</head>
<body>
<div class="container">

    <ul class="nav">
        <li><img src="/static/images/logon.png" width="100"></li>
        <li></li>
        <li><a href="https://www.jianshu.com/">首页</a></li>
        <li><input type="text" name="query" class="query" placeholder="搜索"></li>

        {% if request.session.is_login %}
                  <li style="width: 150px"><a href="#">当前在线：{{ request.session.user_name }}</a></li>
                  <li style="margin-left: 50px"><a href="/logout/">退出</a></li>
              {% else %}
                  <li><a href="http://127.0.0.1:8000/home/login/">登录</a></li>
                  <li><a href="http://127.0.0.1:8000/home/register/">注册</a></li>
              {% endif %}
    </ul>
</div>

   {% block content %}{% endblock %}
<div class="footer">
    <img src="/static/images/footer.png">
</div>
</body>
</html>